home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / e / amigae33a.lha / E_v3.3a / Src.lha / Src / OOmodules / library.e < prev    next >
Text File  |  1996-09-05  |  4KB  |  184 lines

  1. /****** library/--background-- ******************************************
  2.  
  3.     PURPOSE
  4.         Basic implementation of the Library object.
  5.  
  6.     CREATION
  7.         back in Februaray of 1995 by Gregor Goldbach
  8.  
  9.     HISTORY
  10.         Joseph E. van Riper III overworked everything a bit.
  11.  
  12.     SEE ALSO
  13.         library/device
  14.  
  15. ******************************************************************************
  16.  
  17. History
  18.  
  19.  
  20. */
  21. OPT MODULE
  22. OPT EXPORT
  23.  
  24. MODULE 'oomodules/object'
  25.  
  26. OBJECT library OF object
  27. /****** library/--library-- ******************************************
  28.  
  29.     NAME
  30.          library
  31.  
  32.     ATTRIBUTES
  33.          libName -- the name of the library
  34.  
  35.          version -- version of the library. 33 is v1.2 of the AmigaOS,
  36.          37 is OS2.04, 39 is OS3.0, 40 is OS3.1
  37.  
  38.     CREATION
  39.          back in February of 1995 by Gregor Goldbach
  40.  
  41.     HISTORY
  42.          JEVR3 changes; removed 'base', included 'name' and 'version',
  43.          now included in the 'oomodules' hierarchy.
  44. ******************************************************************************
  45.  
  46. History
  47.  
  48.  
  49. */
  50.  identifier
  51.  version
  52. ENDOBJECT
  53.  
  54. PROC select(opts,i) OF library
  55. /****** library/select ******************************************
  56.  
  57.     NAME
  58.         select -- selection of actions via taglist
  59.  
  60.     SYNOPSIS
  61.         library.select()
  62.  
  63.     FUNCTION
  64.         Select an action for this object upon initialization. See
  65.         documentation of Object's new() and select.
  66.  
  67.         These items are recognized:
  68.           "name" -- next item is library name. Note that the identifier
  69.               is set to the string of characters you pass -- it is NOT
  70.               copied, so you have to keep the string.
  71.  
  72.           "ver" -- next item is library version to open.
  73.  
  74.     INPUTS
  75.         opts -- Optionslist
  76.  
  77.         i -- index of optionlist
  78.  
  79.     EXAMPLE
  80.  
  81.        /*
  82.         * create an instance of the library class and open gadtools
  83.         * version 37.
  84.         */
  85.  
  86.         NEW library.new(["name", 'gadtools.library', "ver",37])
  87.  
  88. ******************************************************************************
  89.  
  90. History
  91.  
  92.  
  93. */
  94. DEF item
  95.  
  96.   item:=ListItem(opts,i)
  97.  
  98.   SELECT item
  99.  
  100.     CASE "name"
  101.  
  102.     INC i
  103.     self.identifier:=ListItem(opts,i)
  104.  
  105.     CASE "ver"
  106.  
  107.     INC i
  108.     self.version:=ListItem(opts,i)
  109.  
  110.   ENDSELECT
  111.  
  112. ENDPROC i
  113.  
  114. PROC open() OF library IS self.derivedClassResponse()
  115. /****** library/open ******************************************
  116.  
  117.     NAME
  118.         open() -- Open the library
  119.  
  120.     SYNOPSIS
  121.         library.open()
  122.  
  123.     FUNCTION
  124.         
  125.         Open the library. Not functional in this basic object, the
  126.         derived objects have to take care of that.
  127.  
  128. ******************************************************************************
  129.  
  130. History
  131.  
  132.  
  133. */
  134.  
  135. PROC close() OF library IS self.derivedClassResponse()
  136. /****** library/close ******************************************
  137.  
  138.     NAME
  139.         close() -- Close the library
  140.  
  141.     SYNOPSIS
  142.         library.close()
  143.  
  144.     FUNCTION
  145.         Close the library. Not functional in this basic object, the
  146.         derived objects have to take care of that.
  147.  
  148. ******************************************************************************
  149.  
  150. History
  151.  
  152.  
  153. */
  154.  
  155. PROC end() OF library
  156. /****** library/end ******************************************
  157.  
  158.     NAME
  159.         end() -- Free resources.
  160.  
  161.     SYNOPSIS
  162.         library.end()
  163.  
  164.     FUNCTION
  165.         Frees all resources used by this object. Automatically called
  166.         when ENDing the object.
  167.  
  168.     NOTES
  169.         JEVR3 addition; seemed logical to make 'end()' close() the library.
  170.  
  171. ******************************************************************************
  172.  
  173. History
  174.  
  175.  
  176. */
  177.  
  178.  self.close()
  179. ENDPROC
  180. /*EE folds
  181. -1
  182. 154 23 
  183. EE folds*/
  184.